//
//  UserView.m
//  Lovely Food
//
//  Created by 李经纬 on 15/11/27.
//  Copyright © 2015年 李经纬. All rights reserved.
//

#import "UserView.h"

@implementation UserView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self l_setupViews];
    }
    return self;
}

- (void)l_setupViews
{
//    self.backgroundColor = [UIColor yellowColor];
    
    self.backgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"top.jpg"]];

    [self addSubview:self.backgroundImageView];
    
    
    self.topImageView = [[UIImageView alloc] init];
    self.topImageView.backgroundColor = [UIColor redColor];
    self.topImageView.layer.borderColor = [[UIColor whiteColor] CGColor];
    self.topImageView.layer.borderWidth = 2;
    self.topImageView.userInteractionEnabled = YES;
    self.topImageView.layer.masksToBounds = YES;
    [self addSubview:self.topImageView];
    
    self.numberLabel = [[UILabel alloc] init];
//    self.numberLabel.backgroundColor = [UIColor whiteColor];
    self.numberLabel.layer.borderWidth = 1;
    self.numberLabel.layer.borderColor = [[UIColor whiteColor] CGColor];
    self.numberLabel.layer.masksToBounds = YES;
    self.numberLabel.layer.cornerRadius = 4;
    self.numberLabel.textColor = [UIColor whiteColor];
    self.numberLabel.font = [UIFont systemFontOfSize:10.0];
    self.numberLabel.text = @"  喜欢";
    [self addSubview:self.numberLabel];
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
